using System;
using System.Collections.Generic;
using System.Text;
using Shc.Sql;
using Shc.Json;
namespace CLZ.Data
{
	public static class TableViewArticle
	{
		public const string Table = "View_Article";
		public const string ArticleCategoryName = "ArticleCategoryName";
		public const string ArticleId = "ArticleId";
		public const string ArticleCategoryId = "ArticleCategoryId";
		public const string ArticleTitle = "ArticleTitle";
		public const string ArticleContent = "ArticleContent";
		public const string ArticleCreated = "ArticleCreated";
		public const string ArticleCreater = "ArticleCreater";
		public const string ArticleModified = "ArticleModified";
		public const string ArticleModifieder = "ArticleModifieder";
		public const string StaticHtmlFile = "StaticHtmlFile";
		public const string HtmlName = "HtmlName";
	}
	
	[Serializable]
	public class BaseViewArticle
		: IDbSessionEntity, IJsonClass
	{
		string m_ArticleCategoryName;
		/// <summary>
        /// 
        /// </summary>
        public string ArticleCategoryName
        {
            get { return m_ArticleCategoryName; }
            set { m_ArticleCategoryName = value; }
        }
		
		int m_ArticleId;
		/// <summary>
        /// 
        /// </summary>
        public int ArticleId
        {
            get { return m_ArticleId; }
            set { m_ArticleId = value; }
        }
		
		int? m_ArticleCategoryId;
		/// <summary>
        /// 
        /// </summary>
        public int? ArticleCategoryId
        {
            get { return m_ArticleCategoryId; }
            set { m_ArticleCategoryId = value; }
        }
		
		string m_ArticleTitle;
		/// <summary>
        /// 
        /// </summary>
        public string ArticleTitle
        {
            get { return m_ArticleTitle; }
            set { m_ArticleTitle = value; }
        }
		
		string m_ArticleContent;
		/// <summary>
        /// 
        /// </summary>
        public string ArticleContent
        {
            get { return m_ArticleContent; }
            set { m_ArticleContent = value; }
        }
		
		DateTime m_ArticleCreated;
		/// <summary>
        /// 
        /// </summary>
        public DateTime ArticleCreated
        {
            get { return m_ArticleCreated; }
            set { m_ArticleCreated = value; }
        }
		
		int m_ArticleCreater;
		/// <summary>
        /// 
        /// </summary>
        public int ArticleCreater
        {
            get { return m_ArticleCreater; }
            set { m_ArticleCreater = value; }
        }
		
		DateTime? m_ArticleModified;
		/// <summary>
        /// 
        /// </summary>
        public DateTime? ArticleModified
        {
            get { return m_ArticleModified; }
            set { m_ArticleModified = value; }
        }
		
		int? m_ArticleModifieder;
		/// <summary>
        /// 
        /// </summary>
        public int? ArticleModifieder
        {
            get { return m_ArticleModifieder; }
            set { m_ArticleModifieder = value; }
        }
		
		string m_StaticHtmlFile;
		/// <summary>
        /// 
        /// </summary>
        public string StaticHtmlFile
        {
            get { return m_StaticHtmlFile; }
            set { m_StaticHtmlFile = value; }
        }
		
		string m_HtmlName;
		/// <summary>
        /// 
        /// </summary>
        public string HtmlName
        {
            get { return m_HtmlName; }
            set { m_HtmlName = value; }
        }
		
		
		#region IDbSessionEntity Members
		public void ReadDBData(RowDataReader reader)
        {
            m_ArticleCategoryName = reader[TableViewArticle.ArticleCategoryName];
            m_ArticleId = reader[TableViewArticle.ArticleId];
            m_ArticleCategoryId = reader[TableViewArticle.ArticleCategoryId];
            m_ArticleTitle = reader[TableViewArticle.ArticleTitle];
            m_ArticleContent = reader[TableViewArticle.ArticleContent];
            m_ArticleCreated = reader[TableViewArticle.ArticleCreated];
            m_ArticleCreater = reader[TableViewArticle.ArticleCreater];
            m_ArticleModified = reader[TableViewArticle.ArticleModified];
            m_ArticleModifieder = reader[TableViewArticle.ArticleModifieder];
            m_StaticHtmlFile = reader[TableViewArticle.StaticHtmlFile];
            m_HtmlName = reader[TableViewArticle.HtmlName];
        }
		
		public void WriteDBData(RowDataWriter writer)
        {
        }

        public void SetIdentityAfterInsert(DBObject idd)
        {
        }
		
		public string TableName
        {
            get { return TableViewArticle.Table; }
        }
		#endregion
		
		
		#region IJsonClass Members

        public void JsonDeSerializeObj(JsonHashTable hashToRead)
        {
             m_ArticleCategoryName = hashToRead["ArticleCategoryName"];
			 
             m_ArticleId = hashToRead["ArticleId"];
			 
             m_ArticleCategoryId = hashToRead["ArticleCategoryId"];
			 
             m_ArticleTitle = hashToRead["ArticleTitle"];
			 
             m_ArticleContent = hashToRead["ArticleContent"];
			 
             m_ArticleCreated = hashToRead["ArticleCreated"];
			 
             m_ArticleCreater = hashToRead["ArticleCreater"];
			 
             m_ArticleModified = hashToRead["ArticleModified"];
			 
             m_ArticleModifieder = hashToRead["ArticleModifieder"];
			 
             m_StaticHtmlFile = hashToRead["StaticHtmlFile"];
			 
             m_HtmlName = hashToRead["HtmlName"];
			 
        }

        public void JsonSerializeObj(JsonHashTable hashToFill)
        {
            hashToFill["ArticleCategoryName"] = ArticleCategoryName;
			
            hashToFill["ArticleId"] = ArticleId;
			
            hashToFill["ArticleCategoryId"] = ArticleCategoryId;
			
            hashToFill["ArticleTitle"] = ArticleTitle;
			
            hashToFill["ArticleContent"] = ArticleContent;
			
            hashToFill["ArticleCreated"] = ArticleCreated;
			
            hashToFill["ArticleCreater"] = ArticleCreater;
			
            hashToFill["ArticleModified"] = ArticleModified;
			
            hashToFill["ArticleModifieder"] = ArticleModifieder;
			
            hashToFill["StaticHtmlFile"] = StaticHtmlFile;
			
            hashToFill["HtmlName"] = HtmlName;
			
        }

        #endregion
		
	}
}
